<template>
  <div class="message">
    <!-- <h1>我的消息</h1> -->
    <div class="title">
      <i class="iconfont icon-xiangzuo" @click="$router.go(-1), change()"></i>
      <div class="story">我的消息</div>
    </div>

    <div class="messageCon">
      <ul>
        <li :class="{ con: flag == 0 }" @click="flag = 0">通知</li>
        <li :class="{ con: flag == 1 }" @click="flag = 1">评论</li>
      </ul>
    </div>

    <div class="mainContent">
      <ul>
        <li v-show="flag == 0">
          <div class="icon">
            <i class="iconfont icon-chengzi"></i>
            <p>暂时没有消息</p>
          </div>
        </li>
        <li v-show="flag == 1">
          <div class="icon">
            <i class="iconfont icon-chengzi"></i>
            <p>暂时没有评论</p>
          </div>
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      flag: 0,
    };
  },
  methods: {
    change() {
      this.$emit("getnavs-btn", true);
    },
  },
  created() {
    this.$emit("getnavs-btn", false);
  },
};
</script>

<style lang="less">
.message {
  .title {
    position: fixed;
    width: 100%;
    min-height: 50px;
    display: flex;
    background-color: #fff;
    z-index: 1;
    i {
      flex: 0 0 40px;
      text-align: center;
      line-height: 50px;
      font-size: 20px;
    }
    .story {
      flex: 1;
      text-align: center;
      line-height: 50px;
      font-size: 18px;
      padding-right: 40px;
    }
  }
  .messageCon {
    padding-top: 50px;
    ul {
      display: flex;
      justify-content: space-between;
      background-color: #fff;
      li {
        width: 50%;
        text-align: center;
        padding: 10px 0;
        border-bottom: 1px solid #f6f7f9;
      }
    }
    .con {
      color: rgb(35, 179, 130);
      border-color: rgb(35, 179, 130);
    }
  }
  .mainContent {
    width: 100%;
    height: 100%;
    background-color: #fff;
    ul {
      padding: 15px;
      li {
        .icon {
          margin: 180px auto;
          text-align: center;
          i {
            font-size: 100px;
            color: orange;
          }
          p {
            font-size: 14px;
            margin-top: 15px;
          }
        }
      }
    }
  }
}
</style>